<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/dhj/reports/Statistical_Reports.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/dhj/reports/Statistical_Reports.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'StaffId',
                footer: "Foots",
                cnName: '签到详单统计报表',
                name: 'reports/Statistical_Reports',
                url: "/Statistical_Reports/",
                sortName: "StaffId"
            });
            const editFormFields = ref({"StaffName":"","StaffAccount":"","PrimaryDepartment":"","SubsidiaryDepartment":"","Office":"","CheckInDate":"","CheckInTime":"","CheckInLocation":""});
            const editFormOptions = ref([[{"title":"员工姓名","field":"StaffName"},
                               {"title":"员工账号","field":"StaffAccount"},
                               {"title":"主属部门","field":"PrimaryDepartment","type":"text"},
                               {"title":"附属部门","field":"SubsidiaryDepartment","type":"text"},
                               {"title":"职务","field":"Office"}],
                              [{"title":"签到日期","field":"CheckInDate","type":"date"},
                               {"title":"签到时间","field":"CheckInTime","type":"time"},
                               {"title":"签到地点","field":"CheckInLocation"}]]);
            const searchFormFields = ref({"StaffName":"","StaffAccount":"","PrimaryDepartment":"","SubsidiaryDepartment":"","Office":"","CheckInDate":"","CheckInTime":"","CheckInLocation":""});
            const searchFormOptions = ref([[{"title":"员工姓名","field":"StaffName","type":"like"},{"title":"员工账号","field":"StaffAccount","type":"like"},{"title":"主属部门","field":"PrimaryDepartment","type":"like"},{"title":"附属部门","field":"SubsidiaryDepartment","type":"like"},{"title":"职务","field":"Office","type":"like"}],[{"title":"签到日期","field":"CheckInDate","type":"date"},{"title":"签到时间","field":"CheckInTime"},{"title":"签到地点","field":"CheckInLocation","type":"like"}]]);
            const columns = ref([{field:'StaffId',title:'id',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StaffName',title:'员工姓名',type:'string',width:110,align:'left',sort:true},
                       {field:'StaffAccount',title:'员工账号',type:'string',width:110,align:'left'},
                       {field:'PrimaryDepartment',title:'主属部门',type:'string',width:110,align:'left'},
                       {field:'SubsidiaryDepartment',title:'附属部门',type:'string',width:110,align:'left'},
                       {field:'Office',title:'职务',type:'string',width:110,align:'left'},
                       {field:'CheckInDate',title:'签到日期',type:'date',width:150,align:'left',sort:true},
                       {field:'CheckInTime',title:'签到时间',type:'string',width:220,align:'left'},
                       {field:'CheckInLocation',title:'签到地点',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
